import hireTypeObj from '@/assets/constant/employees.js'
import dayjs from 'dayjs'
export default {
  formater (id) {
    const result = hireTypeObj.hireType.find(item => {
      // 因为后台传来的id是字符串，"+"可以把它转换成数字
      return item.id === +id
    })
    return result ? result.value : '未知'
  },
  formateTime (time) {
    return dayjs(time).format('YYYY-MM-DD')
  }
}
